import { telphoneVaild } from 'common/js/rules'

export const rules = (that) => {
  return {
    'username': [
      { required: true, message: '请填写用户名', trigger: 'change' }
    ],
    'name': [
      { required: true, message: '请填写姓名', trigger: 'change' }
    ],
    'mobilephone': [
      { required: true, validator: telphoneVaild(), trigger: 'change' }
    ],
    'roleid': [
      { type: 'number', required: true, message: '请选择所属角色', trigger: 'change' }
    ]
  }
}
